package com.lwl.blue.commont.enums;

/**
 * <p>  </p>
 *
 * @Date: 2021/12/6 14:48
 * @version: V1.0
 * @Decription:
 * @author: 蓝文良
 */
public enum FileUploadTypeEnum {

    PUBLIC("public", "公共",true,false),
    ITEM("item", "产品新增",true,false),
    QUOTATION_TEMPLATE("quotationTemplate", "报价单模板",false,false),
    ITEM_QUICK("itemQuick","产品图片快捷上传",false,true),
    EXPORT("export", "导出模板",false,false)
    ;

    private final String type;
    private final String name;
    private final Boolean rename;
    private final Boolean replace;

    FileUploadTypeEnum(String type, String name, Boolean rename, Boolean replace) {
        this.type = type;
        this.name = name;
        this.rename=rename;
        this.replace=replace;
    }

    public static FileUploadTypeEnum getFileUploadTypeByType(String type){
        for (FileUploadTypeEnum value : FileUploadTypeEnum.values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }
    public String getType() {
        return this.type;
    }
    public Boolean getReName() {
        return this.rename;
    }
    public Boolean getReplace() {
        return this.replace;
    }


}
